<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%@ include file="/commons/commonList.jsp" %>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>出入证退还</title>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx }/scripts/common/prototype.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/div/common.js"></script>
<script type="text/javascript">

	function submitWin(){
		var tableObj = $('returnPass_table');
		var ckArray = tableObj.getElementsByTagName("input");
		var selectedId = new Array();

		var checkedPassIds = "";

		for(var i = 0; i < ckArray.length; i++){
			if (ckArray[i].type != "checkbox") continue;
			if (ckArray[i].disabled) continue;
			var hidId = "retFS_"+ckArray[i].id;

			if ( ckArray[i].checked ){ //退证
				if ($(hidId).value == 1)continue;
				checkedPassIds += ckArray[i].value+":"+"1;";
			}else{	//不退
			    if ($(hidId).value == 0)continue;
				checkedPassIds += ckArray[i].value+":"+"0;";
			}
		}

		$('idAndSta').value=checkedPassIds;

		$('passReturnForm').submit();
	}
</script>
</head>



<body>
<form id="passReturnForm" name="passReturnForm" action="${ctx}/renovation_certificateAction.do?method=returnPass" method="post">
	<input type="hidden" id="idAndSta" name="idAndSta" value="">
</form>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle" /><span class="window_head_intext">出入证退证</span></td>
        </tr>
    </table></td>
  </tr>
  <tr><td class="aux_header_line_1"></td></tr>
  <tr><td class="aux_header_line_2"></td></tr>
  <tr>
    <td class="content">

	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td class="aux_outtable_color">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
            <tr>
              <td class="aux_intable_td1">房 号：</td>
              <td class="aux_intable_td2">${licenceVO.houseNumber }</td>
              <td class="aux_intable_td1">许可证号：</td>
              <td class="aux_intable_td2">${licenceVO.licenceNumber }</td>
            </tr>
            <tr>
              <td class="aux_intable_td1">业主姓名：</td>
              <td class="aux_intable_td2">${licenceVO.clientNames }</td>
              <td class="aux_intable_td1">装修期限：</td>
              <td class="aux_intable_td2"><fmt:formatDate pattern="yyyy-MM-dd" value="${licenceVO.beginDate }"/>&nbsp;至&nbsp;<fmt:formatDate pattern="yyyy-MM-dd" value="${licenceVO.endDate}"/> </td>
			</tr>

			<tr>
			  	<td colspan="4" class="aux_intable_td1">
				<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab_line">
                       <tr>
                         <td valign="top">


				<div style="overflow: auto;height: 200px">
                         <table width="100%" border="0" cellspacing="0" cellpadding="0" >
                             <tr>
                               <td colspan="5" >
                               <table width="100%" border="0" cellspacing="0" cellpadding="0" id="crmGrid" class="gridControl gridArea">
                                 <tr >
                                    <td width="6%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">序 号</span></td>
									<td width="8%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">姓 名</span></td>
									<td width="6%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">性 别</span></td>
                                    <td width="10%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">工 种</span></td>
                                    <td width="15%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">出入证号</span></td>
                                    <td width="22%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">有效期</span></td>
                                    <td width="14%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">身份证号码</span></td>
                                    <td width="6%" class="align_right" onMouseOver="this.className='grid_sort_on align_right'" onMouseOut="this.className='align_right'"><span class="grid grid_head_line">金 额</span></td>
									<td width="8%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'"><span class="grid grid_head_line">退费状态</span></td>
                                    <td width="8%" class="align_left" onMouseOver="this.className='grid_sort_on align_left'" onMouseOut="this.className='align_left'">证件退回</td>
                                  </tr>
                               </table>
                               <table width="100%" id="returnPass_table" border="0" cellspacing="0" cellpadding="0"  class='gridData2'>

                               		<c:forEach items="${passList}" var="item" varStatus="status">
                               		<tr class="grid">
                                     <td width="6%" class="grid align_left">${status.count}</td>
                                     <td width="8%" class="grid align_left">${item.name }</td>
                                     <td width="6%" class="grid align_left">
                                     	<c:if test="${item.sex == '1' }">男</c:if>
                                     	<c:if test="${item.sex == '0' }">女</c:if>
                                     </td>
                                     <td width="10%" class="grid align_left">${item.workTypeView }</td>
                                     <td width="15%" class="grid align_left">${item.passNumber }</td>
                                     <td width="22%" class="grid align_left"><fmt:formatDate pattern="yyyy-MM-dd" value="${item.beginDate }"/>&nbsp;至&nbsp;<fmt:formatDate pattern="yyyy-MM-dd" value="${item.endDate}"/></td>
                                     <td width="14%" class="grid align_left">${item.identityCard }</td>
                                     <td width="6%" class="grid align_right">${item.chargeFeeSum }</td>
                                     <td width="8%" class="grid align_left">${item.returnFeeStateView }</td>
                                     <td width="8%" class="grid align_left">
                                     <input type="checkbox" id="ck_${item.keyword }" <c:if test="${item.returnState == '1'}"> checked="checked"</c:if>
                                     	<c:if test="${item.returnFeeState == '004'}"> disabled="true" </c:if>  value="${item.keyword }" >
                                     <input type="hidden" id="retFS_ck_${item.keyword }" value="${item.returnState}">
                                     	 </td>
                                   </tr>
                               	   </c:forEach>

                               </table>
                               </td>
                             </tr>
                         </table>
				</div>
                         </td>
                       </tr>
		            </table>
		            </td>
	  		 </tr>

        </table>
        </td>
      </tr>
    </table>

	</td>
  </tr>

  <tr>
    <td class="window_footer">
    <table border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td>
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_21"></td>
              <td class="buttonOffMiddle" id="btn1_22" onclick="submitWin();" onMouseOver="btn_change_over(2)" onMouseOut="btn_change_out(2)" onBlur="btn_change(2)"  ><img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom" /> 保 存</td>
              <td class="buttonOffRight" id="btn1_23"></td>
            </tr>
          </table>
          </td>
          <td class="btn_between_space"></td>
          <td>
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
              <td class="buttonOffMiddle" id="btn1_32" onblur="btn_change(3)" onclick="windowClose();" onMouseOver="btn_change_over(3)" onMouseOut="btn_change_out(3)"><img src="${ctx}/images/ico_cancel.gif" border="0" align="absmiddle" /> 关 闭</td>
              <td class="buttonOffRight" id="btn1_33"></td>
            </tr>
          </table>
          </td>
      </tr>
    </table></td>
  </tr>

</table>
 <c:if test="${fn:length(passList) == 0}"> <script>$("btn1_22").disabled = true;</script> </c:if>
</body>
</html>











